﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Net.Fan.SmallPig.Common;

public partial class MasterPage_MasterPageA : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {

        if (IsPostBack == false)
        {
            LabelShortTitle.Text = Config.Instance.ShortTitle;
        }
    }
    protected void ButtonOpenJob_Click(object sender, EventArgs e)
    {

        string gotoPage = string.Format(Request.ApplicationPath + "/Job/Job.aspx?J=" + TextBoxQuickJobId.Text.Trim());
        string scr = string.Format("<script language='javascript' type='text/javascript'>window.open('{0}');</script>", gotoPage);
        Response.Write(scr);

        //long jobId;
        //if (long.TryParse(TextBoxQuickJobId.Text, out jobId))
        //{
        //    // Response.Redirect("~/Job/Job.aspx?J=" + jobId);

        //    string gotoPage = string.Format(Request.ApplicationPath + "/Job/Job.aspx?J=" + jobId);
        //    string scr = string.Format("<script language='javascript' type='text/javascript'>window.open('{0}');</script>", gotoPage);
        //    Response.Write(scr);
        //}
        //else
        //{
        //    string scr ="<script language='javascript' type='text/javascript'>window.alert('必须是数字!');</script>";
        //    Response.Write(scr);   //this.TextBoxQuickJobId.Text = "必须是数字！";
        //    TextBoxQuickJobId.Focus();

        //}
    }
}
